import server from "../utils/request.js";

export function queryServiceRecord(data,id,name){
    return server({
        url:`/service/record`,
        method:"get",
        params:{
            status:data,
            userId:id,
            name:name
        }
    })
}

export function queryServiceFinished(id,name){
    return server({
        url:`/service`,
        method:'get',
        params:{
            userId:id,
            name:name
        }
    })
}

export function queryDetail(data){
    return server({
        url:`/service/detail/${data}`,
        method:"get"
    })
}

export function update(data){
    return server({
        url:'/service',
        method:"put",
        data:data
    })
}

export function updateDetail(data){
    return server({
        url:'/service/detail',
        method:'put',
        data:data
    })
}

export function queryByName(data,status,id){
    return server({
        url:`/service/record`,
        method:'get',
        params:{
            status:status,
            name:data,
            userId:id
        }
    })
}